﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Koonsoft.HYCRM.BLL;
using Koonsoft.HYCRM.Model;

public partial class Accountant_PurchaseTable : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if(!IsPostBack)
        {
            string company = Request.QueryString["CompanyID"];
            string orderid = Request.QueryString["orderid"];
            GridView1.DataSource = new AuditorsBLL().GetCompanyPurchase(company, orderid);
            GridView1.DataBind();
        }
    }

    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            int Currency = Convert.ToInt32(e.Row.Cells[5].Text);
            CurrencyEnum CStatus = (CurrencyEnum)Currency;
            e.Row.Cells[5].Text = RemarkAttribute.GetEnumRemark(CStatus);
        }
    }
}